# Contributor: Pellegrino Prevete <pellegrinoprevete@gmail.com>
# Maintainer: Newbyte <newbytee@protonmail.com>
pkgname=lollypop
pkgver=1.4.34
# See the git submodule in subprojects/po for the right version
_pover=01af7dd30cb6534326866d656d990119fb6f842a
pkgrel=0
pkgdesc="Music player for GNOME"
url="https://gitlab.gnome.org/World/Lollypop"
# riscv64 disabled due to missing rust in recursive dependency
# armhf, ppc64le: py3-pylast
arch="noarch !armhf !ppc64le !s390x !riscv64" # libhandy missing
license="GPL-3.0-only"
depends="
	gst-plugins-good
	libhandy1
	libsecret
	libsoup
	py3-cairo
	py3-gobject3
	py3-gst
	py3-pillow
	py3-pylast
	python3
	totem-pl-parser
	"
makedepends="
	gobject-introspection-dev
	gtk+3.0-dev
	libhandy1-dev
	libsoup-dev
	meson
	py3-gobject3-dev
	"
checkdepends="
	appstream-glib
	desktop-file-utils
	"
subpackages="$pkgname-lang $pkgname-doc"
source="https://gitlab.gnome.org/World/lollypop/-/archive/$pkgver/lollypop-$pkgver.tar.gz
	https://gitlab.gnome.org/gnumdk/lollypop-po/-/archive/$_pover/lollypop-po-$_pover.tar.gz
	dont-require-py3-gettext-support.patch
	"

prepare() {
	default_prepare

	mv $srcdir/lollypop-po*/* $srcdir/lollypop-$pkgver/subprojects/po/
}

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
87353593433e919a7a643b478b61ddc075795796ebb153082242c198407332b8eec8f8abe37afcd47d065ea9c18a769bb688083b6ff754d58afe8b045bb0da96  lollypop-1.4.34.tar.gz
1221bed75c198086216931dae9c41339efc4a5747f890c7c3c848e7c2f51ce2781f2d65a14294db559156d68869c517b28f1ff55eb3dcbbe18b6f718fe0e320f  lollypop-po-01af7dd30cb6534326866d656d990119fb6f842a.tar.gz
1d514dff539d6d41bed36249d5d5372df81983f6a940657a55a4fa01c94a5389306d8dee48754d07623c913f70d7a59422cb0320975ae78b13e3efe2b66891b5  dont-require-py3-gettext-support.patch
"
